#!/usr/bin/env python
PACKAGE = "mrs_uav_controllers"

import roslib;
roslib.load_manifest(PACKAGE)

from dynamic_reconfigure.parameter_generator_catkin import *

gen = ParameterGenerator()

horizontal = gen.add_group("Horizontal gains");

horizontal.add("kiwxy", double_t, 0, "Integral constant for xy-axes", 0.0, 0.0, 10.0)
horizontal.add("kibxy", double_t, 0, "Integral constant for xy-axes", 0.0, 0.0, 10.0)
horizontal.add("kiwxy_lim", double_t, 0, "xy-axes integral limit", 0.0, 0.0, 10.0)
horizontal.add("kibxy_lim", double_t, 0, "xy-axes integral limit", 0.0, 0.0, 10.0)

attitude = gen.add_group("Attitude control");

attitude.add("kq_roll_pitch", double_t, 0, "Attitude constant for intrinsic roll and pitch control", 0.0, 0.0, 20.0)
attitude.add("kq_yaw", double_t, 0, "Attitude constant for intrinsic yaw control", 0.0, 0.0, 40.0)

mass = gen.add_group("Mass estimator");

mass.add("km", double_t, 0, "Integral constant for mass", 0.0, 0.0, 2.0)
mass.add("km_lim", double_t, 0, "mass integral limit", 0.0, 0.0, 50.0)

output = gen.add_group("Output");

preffered_mode = gen.enum([
                            gen.const("desired_actuators",     int_t, 0, "Actuators"),
                            gen.const("desired_control_group", int_t, 1, "Control group"),
                            gen.const("desired_attitude_rate", int_t, 2, "Attitude rate"),
                            gen.const("desired_orientation",   int_t, 3, "Attitude"),
                          ], "Preferred output mode")

output.add("preferred_output_mode", int_t, 0, "Preffered output mode", 0, 0, 3, edit_method=preffered_mode)
output.add("jerk_feedforward", bool_t, 0, "Jerk feedforward", True)

exit(gen.generate(PACKAGE, "MpcController", "mpc_controller"))
